package club.janna.rpcdemo.domain;

import lombok.Data;

import java.io.Serializable;

@Data
public class Response implements Serializable {

    /**
     * 响应的状态
     */
    private State state;
    /**
     * 响应的数据
     */
    private Object result;

    /**
     * 异常
     */
    private Throwable error;

    public static enum State {
        OK, ERROR, NOT_FOUND, TIMEOUT
    }
}
